package com.chengma.service.impl;

import java.util.List;

import com.chengma.domain.TbUserLikedQuestion;
import com.chengma.mapper.TbUserLikedQuestionMapper;
import com.chengma.service.ITbUserLikedQuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 用户点赞问题Service业务层处理
 * 
 * @author tck
 * @date 2025-03-19
 */
@Service
public class TbUserLikedQuestionServiceImpl implements ITbUserLikedQuestionService
{
    @Autowired
    private TbUserLikedQuestionMapper tbUserLikedQuestionMapper;

    /**
     * 查询用户点赞问题
     * 
     * @param username 用户点赞问题主键
     * @return 用户点赞问题
     */
    @Override
    public TbUserLikedQuestion selectTbUserLikedQuestionByUsername(String username)
    {
        return tbUserLikedQuestionMapper.selectTbUserLikedQuestionByUsername(username);
    }

    /**
     * 查询用户点赞问题列表
     * 
     * @param tbUserLikedQuestion 用户点赞问题
     * @return 用户点赞问题
     */
    @Override
    public List<TbUserLikedQuestion> selectTbUserLikedQuestionList(TbUserLikedQuestion tbUserLikedQuestion)
    {
        return tbUserLikedQuestionMapper.selectTbUserLikedQuestionList(tbUserLikedQuestion);
    }

    /**
     * 新增用户点赞问题
     * 
     * @param tbUserLikedQuestion 用户点赞问题
     * @return 结果
     */
    @Override
    public int insertTbUserLikedQuestion(TbUserLikedQuestion tbUserLikedQuestion)
    {
        return tbUserLikedQuestionMapper.insertTbUserLikedQuestion(tbUserLikedQuestion);
    }

    /**
     * 修改用户点赞问题
     * 
     * @param tbUserLikedQuestion 用户点赞问题
     * @return 结果
     */
    @Override
    public int updateTbUserLikedQuestion(TbUserLikedQuestion tbUserLikedQuestion)
    {
        return tbUserLikedQuestionMapper.updateTbUserLikedQuestion(tbUserLikedQuestion);
    }

    /**
     * 批量删除用户点赞问题
     * 
     * @param usernames 需要删除的用户点赞问题主键
     * @return 结果
     */
    @Override
    public int deleteTbUserLikedQuestionByUsernames(String[] usernames)
    {
        return tbUserLikedQuestionMapper.deleteTbUserLikedQuestionByUsernames(usernames);
    }

    /**
     * 删除用户点赞问题信息
     * 
     * @param username 用户点赞问题主键
     * @return 结果
     */
    @Override
    public int deleteTbUserLikedQuestionByUsername(String username)
    {
        return tbUserLikedQuestionMapper.deleteTbUserLikedQuestionByUsername(username);
    }
}
